<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp" %>
<%@ taglib uri="/comp" prefix="comp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>欢迎访问产品运营互动中心！</title>
		<%@ include file="/commons/include/head-meta.inc.jsp"%>
		<script type="text/javascript" src="${ctx }/bpm/productFLow/apply.js"></script>
		<script type="text/javascript">
			function opAttrValid(isReuire){
				var uploads=$("input[type='file']");
				$.each(uploads,function(index,obj){
					if($(obj).val()==''){
						$(obj).attr('require',isReuire);
					}
				});
			}
		</script>	
	</head>
	<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
	<form name="applyForm" action="opProductFlow.do?action=saveStartFlow" method="post" enctype="multipart/form-data">
		<input type="hidden" name="processId" value="${processView.processConfig.id }"/>
		<input type="hidden" id="isCommitId" name="isCommit" value=""/>
		<table width="980" border="0" cellspacing="0" cellpadding="0"
			align="center">
			<tr>
				<td>
					<table width="100%" border="0" cellpadding="0" cellspacing="0" background="<c:url value="/images/new/gxzl_index_2.gif"/>">

						<tr>
							<td width="20" height="32">
								&nbsp;
							</td>
							<td width="20">
								<img src="<c:url value="/images/new/dq_dot.gif"/>" width="15" height="12" />
							</td>
							<td>
								当前位置：
								<font color="#003399">业务需求交互单</font>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td background="" class="leftbg">
					<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
						<tr>
							<td width="20%" valign="top">
								<div style="margin-left: 20px;margin-top: 5px;margin-bottom: 5px">
									<button onclick="opAttrValid('false');commitForm('opProductFlow.do?action=saveStartFlow',false);" style="margin-right: 6px">保存</button>
									<button onclick="opAttrValid('true');commitForm('opProductFlow.do?action=saveStartFlow',true);" style="margin-right: 6px">提交</button>
									<button id="backHistoryBtn" type="button" onclick="javascript:history.go(-1);" style="margin-right: 6px">返回</button>
									<button id="selProdBtn" type="button" onclick="selectDict();" style="margin-right: 6px">添加产品属性</button>
								</div>
								<table width="96%" border="0" cellspacing="0" cellpadding="0"
									align="center" bgcolor="#FFFFFF">
									<tr>
										<td valign="top" align="center">
												
												<table width="100%" border="0" cellspacing="0"
													cellpadding="7" align="center" class=tablecolor2>
													<tr>
														<td background="<c:url value="/images/catalog_manage_bbs_3.gif"/>"
															colspan="4">
															<span style="margin-top: 0px; margin-left: 14px">
																<img src="<c:url value="/images/catalog_manage_12.gif"/>" width=13 height=13 alt="">
															</span>
															<strong>流程信息</strong>
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																当前状态：
															</div>
														</td>
														<td width="36%">${processView.startNode.name }</td>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																当前办理人：
															</div>
														</td>
														<td width="36%">${LOGINUSER_CONTEXT.currUser.person.name }
														</td>
													</tr>
													<tr>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																当前流程：
															</div>
														</td>
														<td colspan="3">${processView.processConfig.name }
														</td>
													</tr>
			
													<tr>
														<td bgcolor="D6E3FA" width="14%">
															<div align="right" class="STYLE2">
																<font color="red">*</font>下一步骤：
															</div>
														</td>
														<td colspan="3">
															<li style="padding: 0;list-style: upper-roman">
															<select name="taskNodeId" style="width:120px;" >
																<c:forEach items="${processView.childTaskNodeList}" var="listOne">
																<option value="${listOne.id }">${listOne.name }</option>
																</c:forEach>
															</select>
															
															
															<select name="userId" id="taskAssign-userId" style="width:180px" dataType="Require" msg="*">
																<option value="">--请选择--</option>
																<c:forEach items="${processView.childTaskNodeList}" var="listOne">
																<c:forEach items="${listOne.personList }" var="personOne">
																<option value="${personOne.id }">${personOne.name }</option>
																</c:forEach>
																</c:forEach>
															</select>
															</li>
														</td>
													</tr>													

												</table>

												<table id="propertyTable" width="100%" border="0" cellspacing="0" cellpadding="7" align="center" class=tablecolor2>
													<tr>
														<td background="<c:url value="/images/catalog_manage_bbs_3.gif"/>"
															colspan="4">
															<span style="margin-top: 0px; margin-left: 14px">
																<img src="<c:url value="/images/catalog_manage_12.gif"/>" width=13 height=13 alt="">
															</span>
															<strong>基本信息</strong>
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																<font color="red">*</font>产品名称：
															</div>
														</td>
														<td>
															<input name="name" type="text" style="width: 80%" dataType="Require" msg="必填" value="${product.name }"  />
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																访问地址：
															</div>
														</td>
														<td>
															<input name="linkUrl" type="text" style="width: 80%" value="${product.linkUrl }" />
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																产品简介：
															</div>
														</td>
														<td>
															<textarea style="width: 80%;height: 50px" name="briefIntroduction">${product.briefIntroduction }</textarea>
														</td>
													</tr>
													

													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																功能点描述：
															</div>
														</td>
														<td>
															<textarea style="width: 80%;height: 50px" name="description" cols="60" rows="3">${product.description }</textarea>
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																<font color="red">*</font>主要负责人：
															</div>
														</td>
														<td>
															<input type="hidden" name="mainPersons" value="${mainPersons}">
															<input type="text" id="mainPersonNames" style="width: 250px" name="mainPersonNames" readonly value="${mainPersonNames}" dataType="Require" msg="必填">
															<button type="button" style="margin-left: 5px" onClick="selectProcMainPerson()">选择人员</button>
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																其它负责人：
															</div>
														</td>
														<td>
															<input type="hidden" name="persons" value="${persons}">
															<input type="text" name="personNames" style="width: 250px" readonly value="${personNames}">
															<button type="button" style="margin-left: 5px" onClick="selectProPerson()">选择人员</button>
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																所属集团目录：
															</div>
														</td>
														<td>
				                      					<input type="hidden" id="sortId1" name="productSortId" value="${jtProductSort.id}">
				                      					<input type="text" id="sortName1" name="productSortName" readonly value="${jtProductSort.name}" size="55">
									  					<button type="button" style="margin-left: 5px" onClick="showTypeDialog(1)">选择集团目录</button>
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																所属福建省目录：
															</div>
														</td>
														<td>
				                      					<input type="hidden" id="sortId2" name="productSortId" value="${shProductSort.id}">
				                      					<input type="text" id="sortName2" name="productSortName" readonly value="${shProductSort.name}" size="55">
									  					<button type="button" style="margin-left: 5px" onClick="showTypeDialog(2)">选择福建省目录</button>
														</td>
													</tr>
													
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																是否新产品：
															</div>
														</td>
														<td>
															<select name="isNew" style="width:60px">
																<option value="1">
																	是
																</option>
																<option value="0">
																	否
																</option>
															</select>
														</td>
														
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																是否有客户端：
															</div>
														</td>
														<td>
															<select id="isClientSel" name="isClient" style="width:60px">
																<option value="0">
																	无
																</option>
																<option value="1">
																	有
																</option>
															</select>
														</td>
													</tr>
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right" class="STYLE2">
																产品图片：
															</div>
														</td>
														<td>
															<table width="100%" border="0" class=tablecolor2>
																<tr>
																	<td>
																		&nbsp;
																		<font color="red">注：只限于上传img、jpg、gif等图片格式文件，大小限制为10M.</font>
																	</td>
																</tr>
																<tr>
																	<td align="left">
																		<div>
																		<input type="file" name="productImageFile" style="width: 80%" /><button class="addBtnCss" style="margin-right: 6px" type="button">添加</button>
																		</div>
																	</td>
																</tr>
															</table>
														</td>
													</tr>
												</table>
												
												<table width="100%" border="0" cellspacing="0" cellpadding="7" align="center" class="tablecolor2">
													<tr>
														<td background="<c:url value="/images/catalog_manage_bbs_3.gif"/>" colspan="4">
															<span style="margin-top: 0px; margin-left: 14px">
																<img src="<c:url value="/images/catalog_manage_12.gif"/>" width=13 height=13 alt="">
															</span>
															<strong>产品文档</strong>
														</td>
													</tr>
													<c:forEach items="${refeTypeList }" var="listOne">
													<tr>
														<td width="14%" bgcolor="D6E3FA">
															<div align="right">
																<c:if test="${listOne.note=='y' }">
																<font color="red">*</font>
																</c:if>${listOne.name }：
															</div>
														</td>
														<td>
															<div>
															<input type="file" name="${listOne.keyValue }-${listOne.id }" style="width: 80%" ${listOne.note=='y'?'dataType="Require"':'' } msg="*"/><button class="addBtnCss" style="margin-right: 6px" type="button">添加</button>
															</div>														
														</td>
													</tr>
													</c:forEach>
												</table>												
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>